package com.s666.demo.model.dto;

import com.s666.demo.common.validate.CheckMobile;
import lombok.Data;
import org.hibernate.validator.constraints.Range;

import javax.validation.constraints.NotBlank;

/**
 * @author lijin
 */
@Data
public class PeopleDTO {

    @NotBlank(message = "姓名不能为空")
    private String name;

    @Range(min = 1, max = 3, message = "age 必须为1-120")
    private Integer age;

    /**
     * 自定义的的校验
     */
    @CheckMobile
    private String phone;
}